package com.xiao.springcloud.controller;

import com.xiao.springcloud.entities.CommonResult;
import com.xiao.springcloud.entities.Payment;
import com.xiao.springcloud.service.PaymentFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Author xiaoxiaoping
 * @Date 2020/9/8 14:39
 * @Version 1.0
 */
@RestController
@Slf4j
@RequestMapping(value = "/order")
public class OrderFeignController {
	@Resource
	private PaymentFeignService paymentFeignService;
	
	@GetMapping(value = "/get")
	public CommonResult<Payment> getPaymentById(@RequestParam("id") Long id){
		return paymentFeignService.getPaymentById(id);
	}
	
	@GetMapping(value = "/time_out")
	public String getInfoTimeOut(){
		return paymentFeignService.getPaymentTimeOut();
	}
}
